<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateOrderReadInfosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order_read_infos', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('order_id')->comment('订单ID');
            $table->integer('read_num_inc')->default(0)->comment('阅读数增量');
            $table->decimal('amount',10,4)->default(0)->comment('结算金额');
            $table->date('date')->comment('日期');
            $table->integer('hour')->comment('小时');
            $table->integer('min_area')->comment('分钟区间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('order_read_infos');
    }
}
